#include "Blocks/TargetBlock.h"

namespace PocketSurvival
{
    int32_t TargetBlock::getIndex()
    {
        return Index();
    }
    const std::string &TargetBlock::getBlockName()
    {
        static std::string blockName = "TargetBlock";
        return blockName;
    }
    int32_t TargetBlock::getFace(int32_t value)
    {
        return GetMountingFace(Terrain::ExtractData(value));
    }

    const std::vector<BoundingBox> &TargetBlock::getCustomCollisionBoxes(int32_t value)
    {
        int32_t mountingFace = GetMountingFace(Terrain::ExtractData(value));
        if(mountingFace < GET_ARRAY_LEN(BlockConstans::TargetCollisionBoxes))
        {
            return BlockConstans::TargetCollisionBoxes[mountingFace];
        }
        return BlockConstans::zeroCollisionBoxes;
    }
}